{extend name="../../base/view/common/base" /}
{block name="style"}
{include file="/approve/add_style" /}
{/block}
<!-- 主体 -->
{block name="body"}
<form class="layui-form p-4">
	<h3 class="pb-3">公文流转审批</h3>
	{eq name="$id" value="0"}
	<table class="layui-table layui-table-form">
		<tr>
			<td class="layui-td-gray-2">文件名称<font>*</font></td>
			<td colspan="2"><input type="text" name="name" value="" autocomplete="off" placeholder="请输入文件名称" lay-verify="required" lay-reqText="请输入文件名称" class="layui-input"></td>
			<td class="layui-td-gray">紧急程度<font>*</font></td>
			<td colspan="2">
				<select name="detail_type" lay-verify="required" lay-reqText="请选择">
				  <option value="">--请选择--</option>
				  <option value="1">普通</option>
				  <option value="2">紧急</option>
				  <option value="3">特急</option>
				</select>
			</td>
		</tr>
		<tr>
			<td class="layui-td-gray">来文单位<font>*</font></td>
			<td colspan="2"><input type="text" name="address" value="" autocomplete="off" placeholder="请输入来文单位" lay-verify="required" lay-reqText="请输入来文单位" class="layui-input"></td>
			<td class="layui-td-gray">来文日期<font>*</font></td>
			<td colspan="2">
				<input id="detail_time" name="detail_time" autocomplete="off" readonly class="layui-input" value="" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
			</td>
		</tr>
		<tr>
			<td class="layui-td-gray">文件摘要<font>*</font></td>
			<td colspan="5">
			<textarea name="content" placeholder="请输入文件摘要" class="layui-textarea" lay-verify="required" lay-reqText="请输入文件摘要"></textarea></td>
		</tr>
		<tr>
			<td class="layui-td-gray">备注</td>
			<td colspan="5">
				<textarea name="remark" placeholder="请输入备注信息" class="layui-textarea"></textarea>
			</td>
		</tr>
	</table>
	{else/}
	<table class="layui-table layui-table-form">
		<tr>
			<td class="layui-td-gray-2">文件名称<font>*</font></td>
			<td colspan="2"><input type="text" name="name" value="{$detail.name}" autocomplete="off" placeholder="请输入文件名称" lay-verify="required" lay-reqText="请输入文件名称" class="layui-input"></td>
			<td class="layui-td-gray">紧急程度<font>*</font></td>
			<td colspan="2">
				<select name="detail_type" lay-verify="required" lay-reqText="请选择">
				  <option value="">--请选择--</option>
				  <option value="1" {eq name="$detail.detail_type" value="1"}selected=""{/eq}>普通</option>
				  <option value="2" {eq name="$detail.detail_type" value="2"}selected=""{/eq}>紧急</option>
				  <option value="3" {eq name="$detail.detail_type" value="3"}selected=""{/eq}>特急</option>
				</select>
			</td>
		</tr>
		<tr>
			<td class="layui-td-gray">来文单位<font>*</font></td>
			<td colspan="2"><input type="text" name="address" value="{$detail.address}" autocomplete="off" placeholder="请输入来文单位" lay-verify="required" lay-reqText="请输入来文单位" class="layui-input"></td>
			<td class="layui-td-gray">来文日期<font>*</font></td>
			<td colspan="2">
				<input id="detail_time" name="detail_time" readonly autocomplete="off" class="layui-input" value="{$detail.detail_time}" readonly lay-verify="required" placeholder="请选择时间" lay-reqText="请选择时间">
			</td>
		</tr>
		<tr>
			<td class="layui-td-gray">会议室名称<font>*</font></td>
			<td colspan="5"><textarea name="content" placeholder="请输入备注" class="layui-textarea" lay-verify="required" lay-reqText="请输入备注">{$detail.content}</textarea></td>
		</tr>
		<tr>
			<td class="layui-td-gray">备注</td>
			<td colspan="5">
				<textarea name="remark" placeholder="请输入备注" class="layui-textarea">{$detail.remark}</textarea>
			</td>
		</tr>
	</table>
	{/eq}
	{include file="/approve/add_flow" /}
</form>
{/block}
<!-- /主体 -->

<!-- 脚本 -->
{block name="script"}
<script>
const moduleInit = ['tool','employeepicker'];
	function gouguInit() {
		var form = layui.form,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate;		
		if (typeof (flowStep) == "function") {
			flowStep();
		}  
		//日期时间范围
		laydate.render({
			elem: '#detail_time',
			type: 'date',
			format: 'yyyy-MM-dd',
			showBottom: false
		});
	}
</script>
{/block}
<!-- /脚本 -->